<html>
<head>
    <meta charset="utf-8">
    <style>
        *{
            padding: 0;
            margin: 0
        }
    </style>
</head>
<body>
    <div id="app">
        <h1 v-show="show_flag=='message'"> {{message}} </h1>
        <h1 v-show="show_flag=='haha'"> {{haha}} </h1>

        <button v-on:click="click_button()"> 按钮 </button>
    </div>
</body>
<script src="https://unpkg.com/vue@3/dist/vue.global.js">
</script>
<script>
    var new_app=newVue({
        el:"#app",
        data(){
            show_flag: "message";
            message: "Hello nilaile!";
            haha: "Hello World!!"
        },
        methods:{
            click_button:function(){
                if(this.show_flag=='hello'){
                    show_flag='message';
                }
                else{
                    show_flag=='hello';
                }
            }
        }
    });
</script>
</html>